package example.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Service;

@Service
@EnableAsync
public class ThreadService {

    @Async
    public void test() throws InterruptedException {
        Thread.sleep(400);
        for (int i = 0; i < 500; i++) {
            System.out.println(i);
        }
    }
}
